first smallest letter greater than target solution in python